import request from '@/utils/request'

export function getOrgPage(data) {
  return request({
    url: '/institutions/organization/getPage',
    method: 'post',
    data: data
  })
}

export function saveOrganizationInfo(data) {
  return request({
    url: '/institutions/organization/saveOrganizationInfo',
    method: 'post',
    data: data
  })
}
export function deleteOrganization(gnrlid) {
  return request({
    url: `/institutions/organization/deleteOrganization?gnrlid=${gnrlid}`,
    method: 'get'
  })
}
export function editOrganizationInfo(data) {
  return request({
    url: '/institutions/organization/editOrganizationInfo',
    method: 'post',
    data: data
  })
}
export function getOrganizationInfo(gnrlid) {
  return request({
    url: `/institutions/organization/getOrganizationInfo?gnrlid=${gnrlid}`,
    method: 'get'
  })
}
export function getServindustryInfo(gnrlid) {
  return request({
    url: `/institutions/servindustry/getByGnrlid?gnrlid=${gnrlid}`,
    method: 'get'
  })
}
export function getServsysbuildInfo(gnrlid) {
  return request({
    url: `/institutions/servsysbuild/getByGnrlid?gnrlid=${gnrlid}`,
    method: 'get'
  })
}
export function getServsysoperInfo(gnrlid) {
  return request({
    url: `/institutions/servsysoper/getByGnrlid?gnrlid=${gnrlid}`,
    method: 'get'
  })
}
export function getRegrealnalmpInfo(gnrlid) {
  return request({
    url: `/institutions/regrealnalmp/getByGnrlid?gnrlid=${gnrlid}`,
    method: 'get'
  })
}
export function getLicencelistInfo(gnrlid) {
  return request({
    url: `/institutions/licencelist/getByGnrlid?gnrlid=${gnrlid}`,
    method: 'get'
  })
}
export function getIdregdatalistInfo(gnrlid) {
  return request({
    url: `/institutions/idregdatalist/getByGnrlid?gnrlid=${gnrlid}`,
    method: 'get'
  })
}
export function getIdregsyslistInfo(gnrlid) {
  return request({
    url: `/institutions/idregsyslist/getByGnrlid?gnrlid=${gnrlid}`,
    method: 'get'
  })
}
export function getIdsysbacklistInfo(gnrlid) {
  return request({
    url: `/institutions/idsysbacklist/getByGnrlid?gnrlid=${gnrlid}`,
    method: 'get'
  })
}
export function getRegdatabacklistInfo(gnrlid) {
  return request({
    url: `/institutions/regdatabacklist/getByGnrlid?gnrlid=${gnrlid}`,
    method: 'get'
  })
}
export function getRegservlistInfo(gnrlid) {
  return request({
    url: `/institutions/regservlist/getByGnrlid?gnrlid=${gnrlid}`,
    method: 'get'
  })
}

export function getAll() {
  return request({
    url: '/institutions/organization/getAll',
    method: 'get'
  })
}

export function getNotBindOrg() {
  return request({
    url: '/institutions/organization/getNotBindOrg',
    method: 'get'
  })
}

export function registerOrganizationCount() {
  return request({
    url: '/institutions/organization/registerOrganizationCount',
    method: 'get'
  })
}

export function listMainOrganization() {
  return request({
    url: '/institutions/organization/listMainOrganization',
    method: 'get'
  })
}